// Modifiers describe special characteristics of names
// and properties. Modifiers might be supported for
// some names and not others.
//
// Device Drivers should not rely on functionality
// specified as a modifier.
}
TYPE
RegModifiers = UInt32;
RegEntryModifiers = RegModifiers;
RegPropertyModifiers = RegModifiers;
CONST
kRegNoModifiers = $00000000; { no entry modifiers in place }
kRegUniversalModifierMask = $0000FFFF; { mods to all entries }
kRegNameSpaceModifierMask = $00FF0000; { mods to all entries within namespace }
kRegModifierMask = $FF000000; { mods to just this entry }
{ Universal Property Modifiers }
kRegPropertyValueIsSavedToNVRAM = $00000020; { property is non-volatile (saved in NVRAM) }
kRegPropertyValueIsSavedToDisk = $00000040; { property is non-volatile (saved on disk) }
{
///////////////////////
//
// The Registry API
//
///////////////////////
}
{
///////////////////////
//
// Entry Management
//
///////////////////////
}
{
-------------------------------
* EntryID handling
}
{
* Initialize an EntryID to a known invalid state
* note: invalid != uninitialized
}
FUNCTION RegistryEntryIDInit(VAR id: RegEntryID): OSStatus; C;
{
* Compare EntryID's for equality or if invalid
*
* If a NULL value is given for either id1 or id2, the other id
* is compared with an invalid ID. If both are NULL, the id's
* are consided equal (result = true).
}
FUNCTION RegistryEntryIDCompare({CONST}VAR id1: RegEntryID; {CONST}VAR id2: RegEntryID): BOOLEAN; C;
{
* Copy an EntryID
}
FUNCTION RegistryEntryIDCopy({CONST}VAR src: RegEntryID; VAR dst: RegEntryID): OSStatus; C;
{
* Free an ID so it can be reused.
}
FUNCTION RegistryEntryIDDispose(VAR id: RegEntryID): OSStatus; C;
{
-------------------------------
* Adding and removing entries
*
* If (parentEntry) is NULL, the name is assumed
* to be a rooted path. It is rooted to an anonymous, unnamed root.
}
FUNCTION RegistryCStrEntryCreate({CONST}VAR parentEntry: RegEntryID; {CONST}VAR name: RegCStrPathName; VAR newEntry: RegEntryID): OSStatus; C;
FUNCTION RegistryEntryDelete({CONST}VAR id: RegEntryID): OSStatus; C;
TYPE
RegEntryIter = ^LONGINT;
{
* create/dispose the iterator structure
* defaults to root with relationship = kRegIterDescendants
}
FUNCTION RegistryEntryIterateCreate(VAR cookie: RegEntryIter): OSStatus; C;
FUNCTION RegistryEntryIterateDispose(VAR cookie: RegEntryIter): OSStatus; C;
{
* set Entry Iterator to specified entry
}
FUNCTION RegistryEntryIterateSet(VAR cookie: RegEntryIter; {CONST}VAR startEntryID: RegEntryID): OSStatus; C;
{
* Return each value of the iteration
*
* return entries related to the current entry
* with the specified relationship
}
FUNCTION RegistryEntryIterate(VAR cookie: RegEntryIter; relationship: RegEntryIterationOp; VAR foundEntry: RegEntryID; VAR done: BOOLEAN): OSStatus; C;
{
* return entries with the specified property
*
* A NULL RegPropertyValue pointer will return an
* entry with the property containing any value.
}
FUNCTION RegistryEntrySearch(VAR cookie: RegEntryIter; relationship: RegEntryIterationOp; VAR foundEntry: RegEntryID; VAR done: BOOLEAN; {CONST}VAR propertyName: RegPropertyName; propertyValue: UNIV Ptr; propertySize: RegPropertyValueSize): OSStatus; C;
{
--------------------------------
* Find a name in the namespace
*
* This is the fast lookup mechanism.
* NOTE: A reverse lookup mechanism
* has not been provided because
* some name services may not
* provide a fast, general reverse
* lookup.
}
FUNCTION RegistryCStrEntryLookup({CONST}VAR searchPointID: RegEntryID; {CONST}VAR pathName: RegCStrPathName; VAR foundEntry: RegEntryID): OSStatus; C;
{
---------------------------------------------
* Convert an entry to a rooted name string
*
* A utility routine to turn an Entry ID
* back into a name string.
}
FUNCTION RegistryEntryToPathSize({CONST}VAR entryID: RegEntryID; VAR pathSize: RegPathNameSize): OSStatus; C;
FUNCTION RegistryCStrEntryToPath({CONST}VAR entryID: RegEntryID; VAR pathName: RegCStrPathName; pathSize: RegPathNameSize): OSStatus; C;
{
* Parse a path name.
*
* Retrieve the last component of the path, and
* return a spec for the parent.
}
FUNCTION RegistryCStrEntryToName({CONST}VAR entryID: RegEntryID; VAR parentEntry: RegEntryID; VAR nameComponent: RegCStrEntryName; VAR done: BOOLEAN): OSStatus; C;